# -*- coding:utf-8 -*-
from astar_solution      import astar_solution
from problems            import p1
from heuristics          import manhattan_dirt
"""
Created on 15/04/2011

@author: Galus
"""


algo = astar_solution(manhattan_dirt())
print algo.solve(p1)

def compare(problems_sets, algorithm):
    set_result = list()
    for p_set in problems_sets:
        tmp_res = list()
        for problem in p_set:
            tmp_res.append(algorithm.solve(problem)[0])
        set_result.append(sum(tmp_res)/len(tmp_res))
    return set_result



    
    
    